package com.woniuxy.dal.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.woniuxy.dal.entity.Collect;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.woniuxy.dal.vo.CollectVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author rjq51
* @description 针对表【collect(收藏表)】的数据库操作Mapper
* @createDate 2023-03-27 17:14:20
* @Entity com.woniuxy.dal.entity.Collect
*/
@Mapper
public interface CollectMapper extends BaseMapper<Collect> {

//    @Select("\tSELECT a.collectionId,a.rangeId,b.rangeName,b.rangeDetail,a.userId,a.createTime\n" +
//            "\tFROM `collect` a,ranges b\n" +
//            "\tWHERE userId=#{userId} AND a.rangeId = b.rangeId")
//    Page<CollectVo> getCollection(Page<CollectVo> collectVoPage);

        /**
         * 分页查询收藏信息
         *
         * @param page     分页信息
         * @param userId   用户ID
         * @return 分页数据
         */
        IPage<CollectVo> selectCollectVoPage(IPage<CollectVo> page, @Param("userId") Integer userId);

}




